Skip to content

fix: resolve #3362 — suggest although as a replacement for the typo athough#3431

Open
chinhkrb113 wants to merge 2 commits into
Automattic:masterfrom
chinhkrb113:improve/quality/ensure-although-is-suggested-for-the-mis
Open

fix: resolve #3362 — suggest although as a replacement for the typo athough#3431
chinhkrb113 wants to merge 2 commits into
Automattic:masterfrom
chinhkrb113:improve/quality/ensure-although-is-suggested-for-the-mis

Conversation

@chinhkrb113

Copy link
Copy Markdown

Summary

The core issue is in the spell-checking logic. When "athough" is encountered, the spell checker should suggest "although" since it's only one character insertion away (edit distance 1). The spell checker may be deferring to a word-splitting approach that produces "a though" without also considering single-word corrections like "although". The spell check logic needs to either prioritize or include close single-word matches even when a valid split exists

Fixes #3362

Changes

  • harper-core/src/linting/spell_check.rs
  • harper-core/src/linting/spell_check.rs

Why

harper-core/src/linting/spell_check.rs: The core issue is in the spell-checking logic. When "athough" is encountered, the spell checker should suggest "although" since it's only one character insertion away (edit distance 1). The spell checker may be deferring to a word-splitting approach that produces "a though" without also considering single-word corrections like "although". The spell check logic needs to either prioritize or include close single-word matches even when a valid split exists.

…r the typo `athough`

Fixes Automattic#3362

Signed-off-by: ChinhLee <76194645+chinhkrb113@users.noreply.github.com>
…r the typo `athough`

Fixes Automattic#3362

Signed-off-by: ChinhLee <76194645+chinhkrb113@users.noreply.github.com>
for word in document.iter_words() {
let word_chars = document.get_span_content(&word.span);

if is_informal_laughter(word_chars) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem related to spelling or "although" and I'm sure I saw it in your other PR? Cross-contamination?

@chinhkrb113

Copy link
Copy Markdown
Author

Good catch — that does sound like it belongs to the other PR rather than this one. It looks like an unrelated change got mixed in during a rebase/branch overlap. I'll review the diff, strip out anything not tied to the athoughalthough fix, and force-push a cleaned-up version so this PR stays scoped to #3362.

@chinhkrb113 chinhkrb113 requested a review from hippietrail June 1, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

suggest although as a replacement for the typo athough

2 participants